Method and apparatus for performing dynamic recovery management regarding redundant array of independent disks

ABSTRACT

A method and apparatus for performing dynamic recovery management regarding a RAID are provided. The method includes: writing a first set of protected data into a first protected access unit of multiple protected access units of the RAID, and recording a first set of management information corresponding to the first set of protected data, for data recovery of the first set of protected data; and when any storage device of multiple storage devices of the RAID malfunctions, writing a second set of protected data into a second protected access unit of the protected access units, and recording a second set of management information corresponding to the second set of protected data, for data recovery of the second set of protected data. Any set of the first set of protected data and the second set of protected data includes data and multiple parity-check codes.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application and claims the benefit ofU.S. Non-provisional application Ser. No. 16/513,675, which was filed onJul. 16, 2019, and is included herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention is related to storage systems, and moreparticularly, to a method and apparatus for performing dynamic recoverymanagement regarding a redundant array of independent disks (RAID).

2. Description of the Prior Art

A redundant array of independent disks (RAID) may be implemented in aserver. Through various types of RAID schemes, data can obtainprotection at a corresponding level. For the purpose of data backup, theserver may be designed to be equipped with a copy-on-write (COW)architecture. Due to features of the COW architecture, performance ofthe server may degrade as time goes by. To prevent this, the server maybe designed to be equipped with a redirect-on-write (ROW) architecture,but this may result in other problems. When any disk within the RAIDmalfunctions, if a second disk malfunctions, the probability of data ofthe server being unrecoverable will greatly increase. Thus, there is aneed for a novel method and associated architecture, to guarantee astorage system can properly operate under various situations.

SUMMARY OF THE INVENTION

An objective of the present invention is to provide a method andapparatus for performing dynamic recovery management regarding aredundant array of independent disks (RAID), to solve the related artproblems.

Another objective of the present invention is to provide a method andapparatus for performing dynamic recovery management regarding a RAIDthat can guarantee the storage system can properly operate under varioussituations.

Another objective of the present invention is to provide a method andapparatus for performing dynamic recovery management regarding a RAIDthat can solve the related art problems without introducing any sideeffect or in a way that is less likely to introduce side effects.

At least one embodiment of the present invention provides a method forperforming dynamic recovery management regarding a RAID. The method maycomprise: writing a first set of protected data into a first protectedaccess unit of multiple protected access units of the RAID, andrecording a first set of management information corresponding to thefirst set of protected data, for data recovery of the first set ofprotected data, wherein the RAID comprises multiple storage devices, thefirst set of protected data comprises data and multiple parity-checkcodes, RAID information within the first set of management informationindicates the first set of protected data is stored in a first set ofstorage devices of the multiple storage devices, and validityinformation within the first set of management information indicatesrespective validities of the first set of protected data; and inresponse to any storage device of the multiple storage devicesmalfunctioning, writing a second set of protected data into a secondprotected access unit of the multiple protected access units, andrecording a second set of management information corresponding to thesecond set of protected data, for data recovery of the second set ofprotected data, wherein the second set of protected data comprises dataand multiple parity-check codes, RAID information within the second setof management information indicates the second set of protected data isstored in a second set of storage devices of the multiple storagedevices, and validity information within the second set of managementinformation indicates respective validities of the second set ofprotected data. The second set of storage devices is different from thefirst set of storage devices.

The present invention further provides a storage system operatingaccording to the aforementioned method, wherein the storage systemcomprises the RAID.

At least one embodiment of the present invention provides an apparatusfor performing dynamic recovery management regarding a RAID. Theapparatus may comprise a processing circuit, wherein the processingcircuit is positioned in a storage system, and is configured to controloperations of the storage system. The operations of the storage systemmay comprise: writing a first set of protected data into a firstprotected access unit of multiple protected access units of the RAID,and recording a first set of management information corresponding to thefirst set of protected data, for data recovery of the first set ofprotected data, wherein the RAID comprises multiple storage devices, thefirst set of protected data comprises data and multiple parity-checkcodes, RAID information within the first set of management informationindicates the first set of protected data is stored in a first set ofstorage devices of the multiple storage devices, and validityinformation within the first set of management information indicatesrespective validities of the first set of protected data; and inresponse to any storage device of the multiple storage devicesmalfunctioning, writing a second set of protected data into a secondprotected access unit of the multiple protected access units, andrecording a second set of management information corresponding to thesecond set of protected data, for data recovery of the second set ofprotected data, wherein the second set of protected data comprises dataand multiple parity-check codes, RAID information within the second setof management information indicates the second set of protected data isstored in a second set of storage devices of the multiple storagedevices, and validity information within the second set of managementinformation indicates respective validities of the second set ofprotected data. The second set of storage devices is different from thefirst set of storage devices.

The method and apparatus of the present invention can guarantee thestorage system will properly operate under various situations. Forexample, when any disk within a RAID malfunctions, the system managerdoes not need to be concerned that the probability of the data of theserver being unrecoverable will greatly increase due to a second diskmalfunctioning. In addition, the method and apparatus of the presentinvention provide a powerful dynamic recovery management mechanism.Thus, the objectives of optimal performance, high security, budgetcontrol, etc. can be achieved. Additionally, the method and apparatus ofthe present invention can solve the problems in the related art withoutintroducing any side effect or in a way that is less likely to introduceside effects.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a storage system and a user deviceaccording to an embodiment of the present invention.

FIG. 2 is a working flow of a method for performing dynamic recoverymanagement regarding a RAID (such as that shown in FIG. 1) according toan embodiment of the present invention.

FIG. 3 illustrates a plurality of protected access units according to anembodiment of the present invention, where examples of the plurality ofprotected access units may include protected blocks.

FIG. 4 illustrates a redirect-on-write (ROW) scheme of the methodaccording to an embodiment of the present invention.

FIG. 5 illustrates a control scheme of the method according to anembodiment of the present invention.

FIG. 6 illustrates a control scheme of the method according to anotherembodiment of the present invention.

FIG. 7 illustrates a control scheme of the method according to anotherembodiment of the present invention.

FIG. 8 illustrates a control scheme of the method according to anotherembodiment of the present invention.

FIG. 9 illustrates a control scheme of the method according to anotherembodiment of the present invention.

FIG. 10 illustrates a control scheme of the method according to anotherembodiment of the present invention.

DETAILED DESCRIPTION

FIG. 1 is a diagram illustrating a storage system 100 and a user device10 according to an embodiment of the present invention. The user device10 may comprise a processing circuit 11 (e.g. at least one processor andassociated circuits), and may further comprise an interface circuit 12coupled to the processing circuit 11, and a storage device. The storagesystem 100 may comprise a processing circuit 111 (e.g. at least oneprocessor and associated circuits), and may further comprise interfacecircuits 112 and 122 and random access memory (RAM) 121 that are coupledto the processing circuit 111 through a bus 110. Storage devices {130,131, 132, . . . , 146} (such as hard disks and/or solid state drives)may be installed in the storage system 100 through the interface circuit122, and more particularly, the storage devices {131, 132, . . . , 146}may forma RAID, where a program code 111P executed on the processingcircuit 111 may be read from the storage device 130 (e.g. a systemdisk), and may maintain (e.g. establish, store and/or update) amanagement table 121T within the RAM 121 in order to perform relatedoperations to manage a data region DR. In addition, the management table121T may comprise multiple sets of management information for dynamicrecovery management, and each set of management information within themultiple sets of management information (e.g. a row of informationwithin the management table 121T) may comprise RAID information such asRAID bitmap information, and may comprise validity information such asvalidity bitmap information. When needed, the management table 121T maybe backed up in a table region TR, but the present invention is notlimited thereto. Additionally, the interface circuits 12 and 112 may beimplemented as a wired network interface and/or wireless networkinterface, to allow the storage system 100 and the user device 10 toexchange information with each other. A user may access (read or write)user data in the storage system 100 through the user device 10. Examplesof the user device 10 may include, but are not limited to: amultifunctional mobile phone, a tablet, a wearable device and a personalcomputer (such as a desktop computer and a laptop computer). Examples ofthe storage system 100 may include, but are not limited to: a serversuch as a storage server. According to some embodiments, thearchitecture of the storage system 100 may vary. For example, theprogram code 111P may be implemented by a dedicated hardware configuredin the interface circuit 122, to perform related operations of thepresent invention method. According to some embodiments, the number ofstorage devices {131, 132, . . . , 146} within the RAID may vary, e.g.may be increased or reduced.

FIG. 2 is a working flow 200 of a method for performing dynamic recoverymanagement regarding a RAID (such as the RAID shown in FIG. 1) accordingto an embodiment of the present invention, where the RAID may comprisemultiple storage devices such as the storage devices {131, 132, . . . ,146}. The method may be applied to the storage system 100, theprocessing circuit 111 executing the program code 111P, and associatedcomponents shown in FIG. 1. For example, the storage system 100 (e.g.the processing circuit 111) may maintain (e.g. establish, store and/orupdate) respective validity information of the multiple sets ofmanagement information within the management table 121T according to atleast one health state of the RAID such as one or more health statesthereof, in order to generate the latest version of the multiple sets ofmanagement information. Examples of the one or more health states of theRAID may include, but are not limited to: a normal state, a malfunctionstate and a recovery state of one or more storage devices within theRAID.

In Step 210, the storage system 100 (e.g. the processing circuit 111)writes a first set of protected data into a first protected access unitof multiple protected access units of the RAID, and records a first setof management information corresponding to the first set of protecteddata, such as a certain row of information of the management table 121T,for data recovery of the first set of protected data, where the firstset of protected data comprises data and multiple parity-check codes,RAID information within the first set of management informationindicates the first set of protected data being stored in a first set ofstorage devices of the multiple storage devices, and validityinformation within the first set of management information indicatesrespective validities of the first set of protected data.

According to this embodiment, the RAID information within the first setof management information may comprise first RAID bitmap information,and the first RAID bitmap information may comprise a first set of firstbits, where the first set of first bits indicates the first set ofprotected data is respectively stored in the first set of storagedevices. For better comprehension, assume that the multiple storagedevices comprise all of the storage devices {131, 132, . . . , 146}, andall these storage devices are currently operating normally. Under thissituation, the first set of storage devices may comprise all of themultiple storage devices, but the present invention is not limitedthereto. The first set of first bits may be 1111111111111111 (which maybe recorded as 0xFFFF) to indicate the first set of protected data (suchas the aforementioned data and multiple parity-check codes therein) isrespectively stored in the storage devices {131, 132, . . . , 146}. Inaddition, the validity information within the first set of managementinformation may comprise first validity bitmap information, and thefirst validity bitmap information may comprise a first set of secondbits, where the first set of second bits indicates respective validitiesof the first set of protected data, respectively. Under a situationwhere all the storage devices {131, 132, . . . , 146} are currentlyoperating normally, the first set of second bits may be 1111111111111111(which may be recorded as 0xFFFF) to indicate all the first set ofprotected data is valid.

In Step 220, when any storage device of the multiple storage devicesmalfunctions, the storage system 100 (e.g. the processing circuit 111)writes a second set of protected data into a second protected accessunit of the multiple protected access units, and records a second set ofmanagement information corresponding to the second set of protecteddata, such as another row information within the management table 121T,for data recovery of the second set of protected data, where the secondset of protected data comprises data and multiple parity-check codes,RAID information within the second set of management informationindicates the second set of protected data is stored in a second set ofstorage devices of the multiple storage devices, and validityinformation within the second set of management information indicatesrespective validities of the second set of protected data. Moreparticularly, the second set of storage devices is different from thefirst set of storage devices. For example, the second set of storagedevices does not comprise the aforementioned any storage device of themultiple storage devices.

According to this embodiment, the RAID information within the second setof management information may comprise second RAID bitmap information,and the second RAID bitmap information may comprise a second set offirst bits, where the second set of first bits indicates the second setof protected data is respectively stored in the second set of storagedevices. For better comprehension, assume that the multiple storagedevices comprise all of the storage devices {131, 132, . . . , 146}, andmost of these storage devices are currently operating normally, wherethe storage device 131 malfunctions. Under this situation, the secondset of storage devices may comprise the storage devices {132, . . . ,146}, but the present invention is not limited thereto. The second setof first bits may be 0111111111111111 (which may be recorded as 0x8FFF)to indicate the second set of protected data (such as the aforementioneddata and multiple parity-check codes therein) is respectively stored inthe storage devices {132, . . . , 146}. In addition, the validityinformation within the second set of management information may comprisesecond validity bitmap information, and the second validity bitmapinformation may comprise a second set of second bits, where the secondset of second bits indicates respective validities of the second set ofprotected data, respectively. Under a situation where all the storagedevices {132, . . . , 146} are currently operating normally, the secondset of second bits may be 0111111111111111 (which may be recorded as0x8FFF) to indicate all the second set of protected data is valid.Please note that, since the second set of first bits 0111111111111111indicates the second set of protected data is respectively stored in thestorage devices {132, . . . , 146}, only the last 15 bits111111111111111 are meaningful in the second set of second bits0111111111111111 while the first bit 0 may be regarded as “Don't care”according to some viewpoints, but the present invention is not limitedthereto. When needed, and more particularly, when the health state ofthe RAID (e.g. one or more storage devices therein) changes, the storagesystem 100 (e.g. the processing circuit 111) may update respectivevalidity information of the multiple sets of management information,such as multiple sets of second bits, to generate latest versions of themultiple sets of management information, where each set of second bitswithin the multiple sets of second bits indicates respective validity ofa corresponding set of protected data, respectively.

In Step 230, according to a latest version of at least one set ofmanagement information, the storage system 100 (e.g. the processingcircuit 111) performs data recovery of at least one set of protecteddata, where the aforementioned at least one set of managementinformation corresponds to the aforementioned at least one set ofprotected data. For example, the aforementioned at least one set ofmanagement information may comprise the first set of managementinformation, and the aforementioned at least one set of protected datamay comprise the first set of protected data. In another example, theaforementioned at least one set of management information may comprisethe second set of management information, and the aforementioned atleast one set of protected data may comprise the second set of protecteddata. In yet another example, the aforementioned at least one set ofmanagement information may comprise the first set of managementinformation and the second set of management information, and theaforementioned at least one set of protected data may comprise the firstset of protected data and the second set of protected data.

For better comprehension, the method may be illustrated by the workingflow 200 shown in FIG. 2, but the present invention is not limitedthereto. According to some embodiments, one or more steps may be added,removed or modified in the working flow 200.

When the storage device mentioned in Step 220 (i.e. the aforementionedany storage device of the multiple storage devices) malfunctions, thestorage system 100 (e.g. the processing circuit 111) may update thevalidity information within the first set of management information, toindicate that protected data within the first set of protected datastored in this storage device is invalid, for data recovery of the firstset of protected data. In Step 230, according to latest validityinformation within the first set of management information, the storagesystem 100 (e.g. the processing circuit 111) may read valid protecteddata within the first set of protected data, to perform data recovery ofthe first set of protected data according to the valid protected data,where the valid protected data comprises at least one portion (such asone portion or all) of the data within the first set of protected data,and comprises at least one parity-check code of the multipleparity-check codes (such as one or more of these parity-check codes)within the first set of protected data.

In another example, when a second storage device of the multiple storagedevices malfunctions, the storage system 100 (e.g. the processingcircuit 111) may update the validity information within the first set ofmanagement information to indicate that protected data within the firstset of protected data stored in the second storage device is invalid,for data recovery of the first set of protected data. In Step 230,according to latest validity information within the first set ofmanagement information, the storage system 100 (e.g. the processingcircuit 111) may read valid protected data of the first set of protecteddata, to perform data recovery of the first set of protected dataaccording to the valid protected data, where the valid protected datacomprises at least one portion (such as one portion or all) of the datawithin the first set of protected data, but the present invention is notlimited thereto. Under some situations (e.g. the valid protected datacomprises a portion of the data), the valid protected data may compriseat least one parity-check code of the multiple parity-check codes (suchas one or more of these parity-check codes) within the first set ofprotected data.

In yet another example, when the second storage device malfunctions, thestorage system 100 (e.g. the processing circuit 111) may update thevalidity information within the second set of management information toindicate that protected data within the second set of protected datastored in the second storage device is invalid, for data recovery of thesecond set of protected data. In Step 230, according to latest validityinformation within the second set of management information, the storagesystem 100 (e.g. the processing circuit 111) may read valid protecteddata within the second set of protected data to perform data recovery ofthe second set of protected data according to the valid protected data,where the valid protected data comprises at least one portion (such asone portion or all) of the data within the second set of protected data,and comprises at least one parity-check code of the multipleparity-check codes (such as one or more of these parity-check codes)within the second set of protected data.

FIG. 3 illustrates a plurality of protected access units according to anembodiment of the present invention, where examples of the plurality ofprotected access units may include protected blocks 310 and 320, but thepresent invention is not limited thereto. Regarding any protected blockwithin the protected blocks 310 and 320, a symbol “D” may represent datawithin the protected block such as user data respectively stored in somestorage devices, and symbols “P” and “Q” may respectively representparity-check codes within the protected block. Through the parity checkcodes P and Q, the data D can be protected. The parity-check codes P andQ may be the same or different from each other, and more particularly,under a situation where they are different from each other, the storagesystem 100 (e.g. the processing circuit 111) may respectively adoptdifferent encoding rules to perform error correction code (ECC) encodingon the data D in order to generate corresponding parity-check codes Pand Q. For better comprehension, the multiple storage devices of theRAID may comprise the storage devices {131, 132, . . . , 144, 145, 146},but the present invention is not limited thereto. Regarding anyprotected block within the protected blocks 310 and 320, the storagedevices {131, 132, . . . , 144, 145, 146} may store a set of protecteddata (e.g. the first set of protected data), and any of the storagedevices {131, 132, . . . , 144, 145, 146} may store correspondingprotected data within this set of protected data, such as the data D,the parity-check code P or the parity-check code Q. According to someembodiments, a type and/or a protection degree of the RAID may vary,where the user data may obtain protection of a corresponding type and/ordegree. The arrangement of the data D, the parity-check code P and/orthe parity-check code Q may vary. In another example, a number ofstorage devices configured to store the data D and/or a number ofstorage devices configured to store the parity-check codes (such as theparity-check codes P and Q) may vary. In yet another example, regardingany protected block within the protected blocks 310 and 320, a totalnumber of storage devices configured to store the data D and theparity-check codes P and Q may vary.

FIG. 4 illustrates a redirect-on-write (ROW) scheme of the methodaccording to an embodiment of the present invention. The storage system100 (e.g. the processing circuit 111) can write multiple sets ofprotected data into multiple protected blocks of the RAID in a ROWmanner, and respectively record the multiple sets of managementinformation corresponding to the multiple sets of protected data, fordata recovery of the multiple sets of protected data, where any set ofprotected data within the multiple sets of protected data may comprisedata (such as the data D) and multiple parity-check codes (such as theparity-check codes P and Q). Regarding any protected access unit (e.g. acertain protected block within the data region DR) within theaforementioned multiple protected access units in Step 210, the storagesystem 100 (e.g. the processing circuit 111) may record or updatemapping information between a logical address of the data D and aprotected-access-unit address (p-address) of this protected access unitinto a logical-address-to-p-address (L2p) table 410 within the tableregion TR. L2p table 410 may comprise multiple L2p sub-tables, where afirst row of L2p sub-tables may respectively map pages 0-511 (moreparticularly, logical addresses 0-511) to respective storage locationsthereof (e.g. some protected access units such as protected blocks); asecond row of L2p sub-tables may respectively map pages 512-1023 (moreparticularly, logical addresses 512-1023) to respective storagelocations thereof (e.g. some protected access units such as protectedblocks); and the rest may be induced by analogy, but the presentinvention is not limited thereto. According to some embodiments, thesestorage locations may be regarded as ROW locations.

According to some embodiments, a total number of storage devices withinthe RAID may vary, and the total number of storage device configured tostore the data D and the parity-check codes P and Q may accordinglyvary. For example, the RAID may comprise ten storage devices, such asthe first ten storage devices {131, 132, . . . } within the storagedevices {131, 132, . . . , 146} shown in FIG. 1. For bettercomprehension, in the embodiments shown in FIG. 5 to FIG. 10, assume theten storage devices {131, 132, . . . } may be respectively representedby {SD0, SD1, . . . , SD9}.

FIG. 5 illustrates a control scheme of the method according to anembodiment of the present invention, where the plurality of protectedaccess units may comprise multiple groups of protected access units,such as a group 510 that is firstly written and a group 520 that issubsequently written, but the present invention is not limited thereto.For brevity, a row of small frames may represent a protected accessunit, and ten small frames (from left to right) within the row of smallframes may respectively correspond to the ten storage devices {131, 132,. . . } such as the storage devices {SD0, SD1, . . . , SD9}, and moreparticularly, may represent subsets of this protected access unit whichare respectively located at the storage devices {SD0, SD1, . . . , SD9}.Any row of small frames labeled with symbols “D”, “P” and “Q” mayrepresent a protected access unit in which the data D and theparity-check codes P and Q were written before.

As shown in the upper left corner of FIG. 5, for protected data in anyprotected access unit within the group 510, the data D and theparity-check codes P and Q may be respectively stored in the storagedevices {SD0, SD1, . . . , SD9}. Regarding protected data in each of theprotected access units within the group 510, the storage system 100(e.g. the processing circuit 111) may respectively record correspondingRAID bitmap information and validity bitmap information as a set offirst bits 1111111111000000 and a set of second bits 1111111111000000,meaning the protected data is stored in the storage devices {SD0, SD1, .. . , SD9}, respectively, and is all valid. Afterwards, when a certainstorage device such as the storage device SD7 malfunctions (this islabeled “Disk fail” for better comprehension), protected data within thestorage device SD7 becomes unobtainable (this is labeled “F” for bettercomprehension), and therefore may be regarded as invalid. Regarding theprotected data in each of the protected access units within the group510, the storage system 100 (e.g. the processing circuit 111) may updatecorresponding validity bitmap information as a set of second bits1111111011000000, meaning the majority of the protected data is valid,but the protected data within the storage device SD7 may be regarded asinvalid. Afterwards, the storage system 100 (e.g. the processing circuit111) may continue writing, and more particularly, write the user datainto protected access units within the group 520. Regarding protecteddata in each of the protected access units within the group 520, thestorage system 100 (e.g. the processing circuit 111) may respectivelyrecord corresponding RAID bitmap information and validity bitmapinformation as a set of first bits 1111111011000000 and a set of secondbits 1111111011000000, meaning the protected data is stored in ninenormal storage devices {SD0, SD1, . . . , SD6, SD8, SD9} within thestorage devices {SD0, SD1, . . . , SD9}, respectively, and is all valid(in the storage devices {SD0, SD1, . . . , SD6, SD8, SD9}).

Please note that the protected data in each of the protected accessunits within the group 510 may be regarded as (8+2) protected data,where 8 means the data D is distributed in eight storage devices {SD0,SD1, . . . , SD7} (the storage device SD7 malfunctions), and 2 means theparity-check codes P and Q are distributed in two storage devices {SD8,SD9}. In addition, the protected data in each of the protected accessunits within the group 520 may be regarded as (7+2) protected data,where 7 means the data D is distributed in seven storage devices {SD0,SD1, . . . , SD6}, and 2 means the parity-check codes P and Q aredistributed in two storage devices {SD8, SD9}

FIG. 6 illustrates a control scheme of the method according to anotherembodiment of the present invention, where the multiple groups ofprotected access units may comprise the two groups 510 and 520 which arewritten before, a group 530 which is subsequently written and a group540 which is not written yet, but the present invention is not limitedthereto. The leftmost portion of FIG. 6 is similar to the rightmostportion of FIG. 5. When another storage device such as the storagedevice SD9 malfunctions (labeled “Disk fail” for better comprehension),protected data within the storage device SD9 becomes unobtainable(labeled “F” for better comprehension), and therefore may be regarded asinvalid. Regarding the protected data in each of the protected accessunits within the group 510, the storage system 100 (e.g. the processingcircuit 111) may update corresponding validity bitmap information as aset of second bits 1111111010000000, meaning the majority of theprotected data is valid, but the protected data stored by the storagedevices SD7 and SD9 may be regarded as invalid. Regarding the protecteddata in each of the protected access units within the group 520, thestorage system 100 (e.g. the processing circuit 111) may updatecorresponding validity bitmap information as a set of second bits1111111010000000, meaning the majority of the protected data is valid,but the protected data stored by the storage device SD9 may be regardedas invalid. Afterwards, the storage system 100 (e.g. the processingcircuit 111) may continue writing, and more particularly, write the userdata into protected access units within the group 530. Regardingprotected data in each of the protected access units within the group530, the storage system 100 (e.g. the processing circuit 111) mayrespectively record corresponding RAID bitmap information and validitybitmap information as a set of first bits 1111111010000000 and a set ofsecond bits 1111111010000000, meaning the protected data is respectivelystored in eight normal storage devices {SD0, SD1, . . . , SD6, SD8}within the storage devices {SD0, SD1, . . . , SD9} and is all valid (inthe storage devices {SD0, SD1, . . . , SD6, SD8}).

Please note that the protected data in each of the protected accessunits within the group 530 may be regarded as (6+2) protected data,where 6 means the data D is distributed in six storage device {SD0, SD1,. . . , SD5}, and 2 means the parity-check codes P and Q are distributedin two storage devices {SD6, SD8}. As shown in the rightmost portion ofFIG. 6, a number RAID DISK(510) of RAID disks {SD0, SD1, . . . , SD9}adopted by the group 510 is equal to 10, where a number FAIL DISK(510)of malfunctioning disks {SD7, SD9} is equal to 2. In addition, a numberRAID DISK(520) of RAID disks {SD0, SD1, . . . SD6, SD8, SD9} adopted bythe group 520 is equal to 9, where a number FAIL DISK(520) ofmalfunctioning disks {SD9} is equal to 1. Additionally, a number RAIDDISK(530) of RAID disks {SD0, SD1, . . . , SD6, SD8} adopted by thegroup 530 is equal to 8, where a number FAIL DISK(530) of malfunctioningdisks is equal to 0.

FIG. 7 illustrates a control scheme of the method according to anotherembodiment of the present invention. The leftmost portion of FIG. 7 isequivalent to the rightmost portion of FIG. 6. A new storage device iscoupled to the interface circuit 122 to replace a certain malfunctioningstorage device; for example, this new storage device is installed in thestorage system 100 to serve as the latest storage device SD9 (this islabeled “New disk inserted” for better comprehension). Protected accessunits within the storage system 100 that need to be recovered (orrestored) at this moment may comprise respective protected access unitsof the groups 510 and 520. Regarding the protected data in each of theprotected access units within the group 510, the storage system 100(e.g. the processing circuit 111) may recover the parity-check code Qaccording to the data D respectively stored in the storage devices {SD0,SD1, . . . , SD6} and the parity-check code P stored in the storagedevice SD8; more particularly, the storage system 100 (e.g. theprocessing circuit 111) may perform ECC decoding according to the data Drespectively corresponding to the storage devices {SD0, SD1, . . . ,SD6} and the parity-check code P corresponding to the storage device SD8in order to generate the data D corresponding to the storage device SD7,and perform ECC encoding according to the data respectivelycorresponding to the storage devices {SD0, SD1, . . . , SD7} in order togenerate the parity-check code Q corresponding to the storage deviceSD9; and may update the corresponding validity bitmap information to bea set of second bits 1111111011000000, meaning the majority of theprotected data is valid, but the protected data stored by the storagedevice SD7 may be regarded as invalid. In addition, regarding theprotected data in each of the protected access units within the group520, the storage system 100 (e.g. the processing circuit 111) mayrecover the parity-check code Q according to the data D respectivelystored in the storage devices {SD0, SD1, . . . , SD6}; moreparticularly, the storage system 100 (e.g. the processing circuit 111)may perform ECC encoding according to the data D respectivelycorresponding to the storage devices {SD0, SD1, . . . , SD6} in order togenerate the parity-check code Q corresponding to the storage deviceSD9; and may update the corresponding validity bitmap information to bea set of second bits 1111111011000000, meaning the protected data is allvalid. As a result, the protected data within the group 520 iscompletely recovered.

FIG. 8 illustrates a control scheme of the method according to anotherembodiment of the present invention. Anew storage device is coupled tothe interface circuit 122 to replace another malfunctioning storagedevice; for example, this new storage device is installed in the storagesystem 100 to serve as the latest storage device SD7 (this is labeled“New disk inserted” for better comprehension). Protected access unitswithin the storage system. 100 that need to be recovered at this momentmay comprise the protected access units within the groups 510. Regardingthe protected data in each of the protected access units within thegroup 510, the storage system 100 (e.g. the processing circuit 111) mayrecover the data D corresponding to the storage device SD7 according tothe data D respectively stored in the storage devices {SD0, SD1, . . . ,SD6} and the parity-check code P stored in the storage device SD8; moreparticularly, the storage system 100 (e.g. the processing circuit 111)may perform ECC decoding according to the data D respectivelycorresponding to the storage devices {SD0, SD1, . . . , SD6} and theparity-check code P corresponding to the storage device SD8 in order togenerate the data D corresponding to the storage device SD7; and mayupdate the corresponding validity bitmap information to be a set ofsecond bits 1111111111000000, meaning the protected data is all valid.As a result, the protected data within the group 510 is completelyrecovered.

FIG. 9 illustrates a control scheme of the method according to anotherembodiment of the present invention. The leftmost portion of FIG. 9 isequivalent to the rightmost portion of FIG. 6. A new storage device iscoupled to the interface circuit 122 to replace a certain malfunctioningstorage device; for example, this new storage device is installed in thestorage system 100 to serve as the latest storage device SD7 (this islabeled “New disk inserted” for better comprehension). Protected accessunits within the storage system. 100 that need to be recovered at thismoment may comprise the protected access units within the group 510.Regarding the protected data in each of the protected access unitswithin the group 510, the storage system 100 (e.g. the processingcircuit 111) may recover the data D corresponding to the storage deviceSD7 according to the data D respectively stored in the storage devices{SD0, SD1, SD6} and the parity-check code P stored in the storage deviceSD8; more particularly, the storage system 100 (e.g. the processingcircuit 111) may perform ECC decoding according to the data Drespectively corresponding to storage devices {SD0, SD1, SD6} and theparity-check code P corresponding to the storage device SD8 in order togenerate the data D corresponding to the storage device SD7; and mayupdate the corresponding validity bitmap information to be a set ofsecond bits 1111111110000000, meaning the majority of the protected datais valid, but the protected data stored by the storage device SD9 isregarded as invalid.

FIG. 10 illustrates a control scheme of the method according to anotherembodiment of the present invention. The leftmost portion of FIG. 10 isequivalent to the rightmost portion of FIG. 9. A new storage device iscoupled to the interface circuit 122 to replace another malfunctioningstorage device; for example, this new storage device is installed in thestorage system 100 to serve as the latest storage device SD9 (this willbe labeled “New disk inserted”). The protected access units within thestorage system 100 that need to be recovered at this moment may compriserespective protected access units of the group 510 and 520. Regardingthe protected data in each of the protected access units within thegroup 510, the storage system 100 (e.g. the processing circuit 111) mayrecover the parity-check code Q according to the data D respectivelystored in the storage devices {SD0, SD1, . . . , SD7}; moreparticularly, the storage system 100 (e.g. the processing circuit 111)may perform ECC encoding according to the data D respectivelycorresponding to the storage devices {SD0, SD1, . . . , SD7} in order togenerate the parity-check code Q corresponding to the storage deviceSD9; and may update the corresponding validity bitmap information to bea set of second bits 1111111111000000, meaning the protected data is allvalid. As a result, the protected data within the group 510 iscompletely recovered. In addition, regarding the protected data in eachof the protected access units within the group 520, the storage system100 (e.g. the processing circuit 111) may recover the parity-check codeQ according to the data D respectively stored in the storage devices{SD0, SD1, . . . , SD6}; more particularly, the storage system 100 (e.g.the processing circuit 111) may perform ECC encoding according to thedata D respectively corresponding to the storage devices {SD0, SD1, . .. , SD6} in order to generate the parity-check code Q corresponding tothe storage device SD9; and may update the corresponding validity bitmapinformation to be a set of second bits 1111111011000000, meaning theprotected data is all valid. As a result, the protected data within thegroup 520 is completely recovered.

According to some embodiments, the multiple sets of managementinformation may vary. For example, regarding any set (more particularly,each set) of the multiple set of management information, a bit count offirst bits within the RAID bitmap information (such as the first RAIDbitmap information, the second RAID bitmap information, etc.) and/or abit count of second bits within the validity bitmap information (such asthe first validity bitmap information, the second validity bitmapinformation, etc.) may vary (e.g. increase or decrease). For brevity,similar descriptions for these embodiments are not repeated in detailhere.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

What is claimed is:
 1. A method for performing dynamic recoverymanagement regarding a redundant array of independent disks (RAID), themethod comprising: writing a first set of protected data into a firstaccess unit of multiple access units of the RAID, and recording a firstset of management information corresponding to the first set ofprotected data, for data recovery of the first set of protected data,wherein the RAID comprises multiple storage devices, any access unit ofthe multiple access units is a logical access unit of the RAID regardingaccessing the RAID, and comprises respective partial storage regions ofthe multiple storage devices, the first set of protected data comprisesdata and multiple parity-check codes configured to protect said data ofthe first set of protected data, RAID information within the first setof management information indicates the first set of protected data isstored in a first set of storage devices of the multiple storagedevices, and validity information within the first set of managementinformation indicates respective validities of the first set ofprotected data; and in response to any storage device of the multiplestorage devices malfunctioning, writing a second set of protected datainto a second access unit of the multiple access units, and recording asecond set of management information corresponding to the second set ofprotected data, for data recovery of the second set of protected data,wherein the second set of protected data comprises data and multipleparity-check codes configured to protect said data of the second set ofprotected data, RAID information within the second set of managementinformation indicates the second set of protected data is stored in asecond set of storage devices of the multiple storage devices, andvalidity information within the second set of management informationindicates respective validities of the second set of protected data;wherein the second set of storage devices is different from the firstset of storage devices.
 2. The method of claim 1, wherein the RAIDinformation within the first set of management information comprisesfirst RAID bitmap information, the first RAID bitmap informationcomprises a first set of first bits, and the first set of first bitsindicates the first set of protected data is respectively stored in thefirst set of storage devices.
 3. The method of claim 2, wherein the RAIDinformation within the second set of management information comprisessecond RAID bitmap information, the second RAID bitmap informationcomprises a second set of first bits, and the second set of first bitsindicates the second set of protected data is respectively stored in thesecond set of storage devices.
 4. The method of claim 1, wherein thevalidity information within the first set of management informationcomprises first validity bitmap information, the first validity bitmapinformation comprises a first set of second bits, and the first set ofsecond bits indicates respective validities of the first set ofprotected data, respectively.
 5. The method of claim 4, wherein thevalidity information within the second set of management informationcomprises second validity bitmap information, the second validity bitmapinformation comprises a second set of second bits, and the second set ofsecond bits indicates respective validities of the second set ofprotected data, respectively.
 6. The method of claim 1, wherein thesecond set of storage devices does not comprise said any storage device.7. The method of claim 1, further comprising: in response to said anystorage device malfunctioning, updating the validity information withinthe first set of management information to indicate protected datawithin the first set of protected data stored in said any storage deviceis invalid, for data recovery of the first set of protected data.
 8. Themethod of claim 7, further comprising: according to latest validityinformation within the first set of management information, readingvalid protected data of the first set of protected data to perform datarecovery of the first set of protected data according to the validprotected data, wherein the valid protected data comprises at least oneportion of the data within the first set of protected data, andcomprises at least one parity-check code of the multiple parity-checkcodes within the first set of protected data.
 9. The method of claim 7,further comprising: in response to a second storage device of themultiple storage devices malfunctioning, updating the validityinformation within the first set of management information to indicateprotected data within the first set of protected data stored in thesecond storage device is invalid, for data recovery of the first set ofprotected data.
 10. The method of claim 9, further comprising: accordingto latest validity information within the first set of managementinformation, reading valid protected data of the first set of protecteddata to perform data recovery of the first set of protected dataaccording to the valid protected data, wherein the valid protected datacomprises at least one portion of the data within the first set ofprotected data.
 11. The method of claim 7, further comprising: inresponse to a second storage device of the multiple storage devicesmalfunctioning, updating the validity information within the second setof management information to indicate protected data within the secondset of protected data stored in the second storage device is invalid,for data recovery of the second set of protected data.
 12. The method ofclaim 11, further comprising: according to latest validity informationwithin the second set of management information, reading valid protecteddata of the second set of protected data to perform data recovery of thesecond set of protected data according to the valid protected data,wherein the valid protected data comprises at least one portion of thedata within the second set of protected data, and comprises at least oneparity-check code of the multiple parity-check codes within the secondset of protected data.
 13. A storage system operating according to themethod of claim 1, wherein the storage system comprises the RAID.
 14. Anapparatus for performing dynamic recovery management regarding aredundant array of independent disks (RAID), the apparatus comprising: aprocessing circuit, positioned in a storage system, configured tocontrol operations of the storage system, wherein the operations of thestorage system comprise: writing a first set of protected data into afirst access unit of multiple access units of the RAID, and recording afirst set of management information corresponding to the first set ofprotected data, for data recovery of the first set of protected data,wherein the RAID comprises multiple storage devices, any access unit ofthe multiple access units is a logical access unit of the RAID regardingaccessing the RAID, and comprises respective partial storage regions ofthe multiple storage devices, the first set of protected data comprisesdata and multiple parity-check codes configured to protect said data ofthe first set of protected data, RAID information within the first setof management information indicates the first set of protected data isstored in a first set of storage devices of the multiple storagedevices, and validity information within the first set of managementinformation indicates respective validities of the first set ofprotected data; and in response to any storage device of the multiplestorage devices malfunctioning, writing a second set of protected datainto a second access unit of the multiple access units, and recording asecond set of management information corresponding to the second set ofprotected data, for data recovery of the second set of protected data,wherein the second set of protected data comprises data and multipleparity-check codes configured to protect said data of the second set ofprotected data, RAID information within the second set of managementinformation indicates the second set of protected data is stored in asecond set of storage devices of the multiple storage devices, andvalidity information within the second set of management informationindicates respective validities of the second set of protected data;wherein the second set of storage devices is different from the firstset of storage devices.